package cs236703.winter2013.hw4.tests;

import static org.junit.Assert.*;


import org.junit.Test;

import cs236703.winter2013.hw4.solution.JCore;
import cs236703.winter2013.hw4.solution.JTestSummary;

public class MyTest {

	@Test
	public void myTest() {
		
		JTestSummary result = JCore.testClass(MyClass.class);
		assertEquals(2, result.getNumSuccesses());
		assertEquals(1, result.getNumFailures());
		assertEquals(1, result.getNumErrors());
		
		result = JCore.testClass(MyDerivedClass.class);
		assertEquals(3, result.getNumSuccesses());
		assertEquals(1, result.getNumFailures());
		assertEquals(1, result.getNumErrors());
		
		try {
			result = JCore.testClass(NoTest.class);
			assertTrue(false);
		} catch (IllegalArgumentException e) {}
		
	}

}

